package com.dt.platform.domain.oa;

import com.github.foxnic.dao.entity.Entity;
import io.swagger.annotations.ApiModel;
import javax.persistence.Table;
import com.github.foxnic.sql.meta.DBTable;
import com.dt.platform.constants.db.OaTables.OA_FIN_PAYMENT_NO_TICKET;
import javax.persistence.Id;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Transient;
import com.github.foxnic.api.swagger.EnumFor;
import org.github.foxnic.web.domain.hrm.Employee;
import com.foxnicweb.web.domain.contract.Contract;
import org.github.foxnic.web.domain.bpm.ProcessInstance;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.foxnic.commons.lang.DataParser;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import com.github.foxnic.dao.entity.EntityContext;
import com.dt.platform.domain.oa.meta.FinPaymentNoTicketMeta;
import com.github.foxnic.sql.data.ExprRcd;



/**
 * 无发票付款
 * <p>无发票付款 , 数据表 oa_fin_payment_no_ticket 的PO类型</p>
 * @author 金杰 , maillank@qq.com
 * @since 2025-06-23 10:15:36
 * @sign 11089DB75E149E76356462A0AB202A31
 * 此文件由工具自动生成，请勿修改。若表结构或配置发生变动，请使用工具重新生成。
*/

@Table(name = "oa_fin_payment_no_ticket")
@ApiModel(description = "无发票付款 ; 无发票付款 , 数据表 oa_fin_payment_no_ticket 的PO类型")
public class FinPaymentNoTicket extends Entity {

	private static final long serialVersionUID = 1L;

	public static final DBTable TABLE =OA_FIN_PAYMENT_NO_TICKET.$TABLE;
	
	/**
	 * 主键：主键
	*/
	@Id
	@ApiModelProperty(required = true,value="主键" , notes = "主键" , example = "701391896261427205")
	private String id;
	
	/**
	 * 单据编号：单据编号
	*/
	@ApiModelProperty(required = false,value="单据编号" , notes = "单据编号" , example = "C543542")
	private String businessCode;
	
	/**
	 * 单据名称：单据名称
	*/
	@ApiModelProperty(required = false,value="单据名称" , notes = "单据名称" , example = "无票付款申请-20250608")
	private String name;
	
	/**
	 * 流程状态：流程状态
	*/
	@ApiModelProperty(required = false,value="流程状态" , notes = "流程状态" , example = "complete")
	private String status;
	
	/**
	 * 付款金额：付款金额
	*/
	@ApiModelProperty(required = false,value="付款金额" , notes = "付款金额" , example = "0.00")
	private BigDecimal amount;
	
	/**
	 * 付款主体：付款主体
	*/
	@ApiModelProperty(required = false,value="付款主体" , notes = "付款主体" , example = "700771698256904197")
	private String paymentSubject;
	
	/**
	 * 收款主体：收款主体
	*/
	@ApiModelProperty(required = false,value="收款主体" , notes = "收款主体" , example = "1212")
	private String collectSubject;
	
	/**
	 * 关联合同：关联合同
	*/
	@ApiModelProperty(required = false,value="关联合同" , notes = "关联合同")
	private String contractId;
	
	/**
	 * 关联项目：关联项目
	*/
	@ApiModelProperty(required = false,value="关联项目" , notes = "关联项目")
	private String projectId;
	
	/**
	 * 申请人员：申请人员
	*/
	@ApiModelProperty(required = false,value="申请人员" , notes = "申请人员" , example = "E001")
	private String originatorId;
	
	/**
	 * 备注：备注
	*/
	@ApiModelProperty(required = false,value="备注" , notes = "备注" , example = "121212")
	private String notes;
	
	/**
	 * 付款状态：付款状态
	*/
	@ApiModelProperty(required = false,value="付款状态" , notes = "付款状态" , example = "wait")
	private String paymentStatus;
	
	/**
	 * 已付金额：已付金额
	*/
	@ApiModelProperty(required = false,value="已付金额" , notes = "已付金额" , example = "1.00")
	private BigDecimal paymentAmount;
	
	/**
	 * 最后付款时间：最后付款时间
	*/
	@ApiModelProperty(required = false,value="最后付款时间" , notes = "最后付款时间")
	private Date paymentLastDate;
	
	/**
	 * 附件：附件
	*/
	@ApiModelProperty(required = false,value="附件" , notes = "附件")
	private String fileIds;
	
	/**
	 * 创建人ID：创建人ID
	*/
	@ApiModelProperty(required = false,value="创建人ID" , notes = "创建人ID" , example = "110588348101165911")
	private String createBy;
	
	/**
	 * 创建时间：创建时间
	*/
	@ApiModelProperty(required = false,value="创建时间" , notes = "创建时间" , example = "2025-06-08 01:41:01")
	private Date createTime;
	
	/**
	 * 修改人ID：修改人ID
	*/
	@ApiModelProperty(required = false,value="修改人ID" , notes = "修改人ID")
	private String updateBy;
	
	/**
	 * 修改时间：修改时间
	*/
	@ApiModelProperty(required = false,value="修改时间" , notes = "修改时间")
	private Date updateTime;
	
	/**
	 * 是否已删除：是否已删除
	*/
	@ApiModelProperty(required = true,value="是否已删除" , notes = "是否已删除" , example = "0")
	private Integer deleted;
	@Transient
	@EnumFor("deleted")
	private Boolean deletedBool;
	
	/**
	 * 删除人ID：删除人ID
	*/
	@ApiModelProperty(required = false,value="删除人ID" , notes = "删除人ID")
	private String deleteBy;
	
	/**
	 * 删除时间：删除时间
	*/
	@ApiModelProperty(required = false,value="删除时间" , notes = "删除时间")
	private Date deleteTime;
	
	/**
	 * 数据版本号：数据版本号
	*/
	@ApiModelProperty(required = true,value="数据版本号" , notes = "数据版本号" , example = "1")
	private Integer version;
	
	/**
	 * 租户：租户
	*/
	@ApiModelProperty(required = false,value="租户" , notes = "租户" , example = "T001")
	private String tenantId;
	
	/**
	 * originator：originator
	*/
	@ApiModelProperty(required = false,value="originator" , notes = "originator")
	private Employee originator;
	
	/**
	 * companySubject：companySubject
	*/
	@ApiModelProperty(required = false,value="companySubject" , notes = "companySubject")
	private FinCompanySubject companySubject;
	
	/**
	 * project：project
	*/
	@ApiModelProperty(required = false,value="project" , notes = "project")
	private Project project;
	
	/**
	 * contract：contract
	*/
	@ApiModelProperty(required = false,value="contract" , notes = "contract")
	private Contract contract;
	
	/**
	 * 历史流程清单：历史流程清单
	*/
	@ApiModelProperty(required = false,value="历史流程清单" , notes = "历史流程清单")
	private List<ProcessInstance> historicProcessList;
	
	/**
	 * 在批的流程清单：在批的流程清单
	*/
	@ApiModelProperty(required = false,value="在批的流程清单" , notes = "在批的流程清单")
	private List<ProcessInstance> currentProcessList;
	
	/**
	 * 默认流程：优先取在批的流程
	*/
	@ApiModelProperty(required = false,value="默认流程" , notes = "优先取在批的流程")
	private ProcessInstance defaultProcess;
	
	/**
	 * 获得 主键<br>
	 * 主键
	 * @return 主键
	*/
	public String getId() {
		return id;
	}
	
	/**
	 * 设置 主键
	 * @param id 主键
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setId(String id) {
		this.id=id;
		return this;
	}
	
	/**
	 * 获得 单据编号<br>
	 * 单据编号
	 * @return 单据编号
	*/
	public String getBusinessCode() {
		return businessCode;
	}
	
	/**
	 * 设置 单据编号
	 * @param businessCode 单据编号
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setBusinessCode(String businessCode) {
		this.businessCode=businessCode;
		return this;
	}
	
	/**
	 * 获得 单据名称<br>
	 * 单据名称
	 * @return 单据名称
	*/
	public String getName() {
		return name;
	}
	
	/**
	 * 设置 单据名称
	 * @param name 单据名称
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setName(String name) {
		this.name=name;
		return this;
	}
	
	/**
	 * 获得 流程状态<br>
	 * 流程状态
	 * @return 流程状态
	*/
	public String getStatus() {
		return status;
	}
	
	/**
	 * 设置 流程状态
	 * @param status 流程状态
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setStatus(String status) {
		this.status=status;
		return this;
	}
	
	/**
	 * 获得 付款金额<br>
	 * 付款金额
	 * @return 付款金额
	*/
	public BigDecimal getAmount() {
		return amount;
	}
	
	/**
	 * 设置 付款金额
	 * @param amount 付款金额
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setAmount(BigDecimal amount) {
		this.amount=amount;
		return this;
	}
	
	/**
	 * 获得 付款主体<br>
	 * 付款主体
	 * @return 付款主体
	*/
	public String getPaymentSubject() {
		return paymentSubject;
	}
	
	/**
	 * 设置 付款主体
	 * @param paymentSubject 付款主体
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setPaymentSubject(String paymentSubject) {
		this.paymentSubject=paymentSubject;
		return this;
	}
	
	/**
	 * 获得 收款主体<br>
	 * 收款主体
	 * @return 收款主体
	*/
	public String getCollectSubject() {
		return collectSubject;
	}
	
	/**
	 * 设置 收款主体
	 * @param collectSubject 收款主体
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setCollectSubject(String collectSubject) {
		this.collectSubject=collectSubject;
		return this;
	}
	
	/**
	 * 获得 关联合同<br>
	 * 关联合同
	 * @return 关联合同
	*/
	public String getContractId() {
		return contractId;
	}
	
	/**
	 * 设置 关联合同
	 * @param contractId 关联合同
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setContractId(String contractId) {
		this.contractId=contractId;
		return this;
	}
	
	/**
	 * 获得 关联项目<br>
	 * 关联项目
	 * @return 关联项目
	*/
	public String getProjectId() {
		return projectId;
	}
	
	/**
	 * 设置 关联项目
	 * @param projectId 关联项目
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setProjectId(String projectId) {
		this.projectId=projectId;
		return this;
	}
	
	/**
	 * 获得 申请人员<br>
	 * 申请人员
	 * @return 申请人员
	*/
	public String getOriginatorId() {
		return originatorId;
	}
	
	/**
	 * 设置 申请人员
	 * @param originatorId 申请人员
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setOriginatorId(String originatorId) {
		this.originatorId=originatorId;
		return this;
	}
	
	/**
	 * 获得 备注<br>
	 * 备注
	 * @return 备注
	*/
	public String getNotes() {
		return notes;
	}
	
	/**
	 * 设置 备注
	 * @param notes 备注
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setNotes(String notes) {
		this.notes=notes;
		return this;
	}
	
	/**
	 * 获得 付款状态<br>
	 * 付款状态
	 * @return 付款状态
	*/
	public String getPaymentStatus() {
		return paymentStatus;
	}
	
	/**
	 * 设置 付款状态
	 * @param paymentStatus 付款状态
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setPaymentStatus(String paymentStatus) {
		this.paymentStatus=paymentStatus;
		return this;
	}
	
	/**
	 * 获得 已付金额<br>
	 * 已付金额
	 * @return 已付金额
	*/
	public BigDecimal getPaymentAmount() {
		return paymentAmount;
	}
	
	/**
	 * 设置 已付金额
	 * @param paymentAmount 已付金额
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setPaymentAmount(BigDecimal paymentAmount) {
		this.paymentAmount=paymentAmount;
		return this;
	}
	
	/**
	 * 获得 最后付款时间<br>
	 * 最后付款时间
	 * @return 最后付款时间
	*/
	public Date getPaymentLastDate() {
		return paymentLastDate;
	}
	
	/**
	 * 设置 最后付款时间
	 * @param paymentLastDate 最后付款时间
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setPaymentLastDate(Date paymentLastDate) {
		this.paymentLastDate=paymentLastDate;
		return this;
	}
	
	/**
	 * 获得 附件<br>
	 * 附件
	 * @return 附件
	*/
	public String getFileIds() {
		return fileIds;
	}
	
	/**
	 * 设置 附件
	 * @param fileIds 附件
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setFileIds(String fileIds) {
		this.fileIds=fileIds;
		return this;
	}
	
	/**
	 * 获得 创建人ID<br>
	 * 创建人ID
	 * @return 创建人ID
	*/
	public String getCreateBy() {
		return createBy;
	}
	
	/**
	 * 设置 创建人ID
	 * @param createBy 创建人ID
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setCreateBy(String createBy) {
		this.createBy=createBy;
		return this;
	}
	
	/**
	 * 获得 创建时间<br>
	 * 创建时间
	 * @return 创建时间
	*/
	public Date getCreateTime() {
		return createTime;
	}
	
	/**
	 * 设置 创建时间
	 * @param createTime 创建时间
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setCreateTime(Date createTime) {
		this.createTime=createTime;
		return this;
	}
	
	/**
	 * 获得 修改人ID<br>
	 * 修改人ID
	 * @return 修改人ID
	*/
	public String getUpdateBy() {
		return updateBy;
	}
	
	/**
	 * 设置 修改人ID
	 * @param updateBy 修改人ID
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setUpdateBy(String updateBy) {
		this.updateBy=updateBy;
		return this;
	}
	
	/**
	 * 获得 修改时间<br>
	 * 修改时间
	 * @return 修改时间
	*/
	public Date getUpdateTime() {
		return updateTime;
	}
	
	/**
	 * 设置 修改时间
	 * @param updateTime 修改时间
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setUpdateTime(Date updateTime) {
		this.updateTime=updateTime;
		return this;
	}
	
	/**
	 * 获得 是否已删除<br>
	 * 是否已删除
	 * @return 是否已删除
	*/
	public Integer getDeleted() {
		return deleted;
	}
	
	/**
	 * 获得 是否已删除 的投影属性<br>
	 * 等价于 getDeleted 方法，获得对应的枚举类型
	 * @return 是否已删除
	*/
	@Transient
	public Boolean isDeleted() {
		if(this.deletedBool==null) {
			this.deletedBool=DataParser.parseBoolean(deleted);
		}
		return this.deletedBool ;
	}
	
	/**
	 * 设置 是否已删除
	 * @param deleted 是否已删除
	 * @return 当前对象
	*/
	@JsonProperty("deleted")
	public FinPaymentNoTicket setDeleted(Integer deleted) {
		this.deleted=deleted;
		this.deletedBool=DataParser.parseBoolean(deleted);
		return this;
	}
	
	/**
	 * 设置 是否已删除的投影属性，等同于设置 是否已删除
	 * @param deletedBool 是否已删除
	 * @return 当前对象
	*/
	@Transient
	public FinPaymentNoTicket setDeleted(Boolean deletedBool) {
		if(deletedBool==null) {
			this.deleted=null;
		} else {
			this.deleted=deletedBool?1:0;
		}
		this.deletedBool=deletedBool;
		return this;
	}
	
	/**
	 * 获得 删除人ID<br>
	 * 删除人ID
	 * @return 删除人ID
	*/
	public String getDeleteBy() {
		return deleteBy;
	}
	
	/**
	 * 设置 删除人ID
	 * @param deleteBy 删除人ID
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setDeleteBy(String deleteBy) {
		this.deleteBy=deleteBy;
		return this;
	}
	
	/**
	 * 获得 删除时间<br>
	 * 删除时间
	 * @return 删除时间
	*/
	public Date getDeleteTime() {
		return deleteTime;
	}
	
	/**
	 * 设置 删除时间
	 * @param deleteTime 删除时间
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setDeleteTime(Date deleteTime) {
		this.deleteTime=deleteTime;
		return this;
	}
	
	/**
	 * 获得 数据版本号<br>
	 * 数据版本号
	 * @return 数据版本号
	*/
	public Integer getVersion() {
		return version;
	}
	
	/**
	 * 设置 数据版本号
	 * @param version 数据版本号
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setVersion(Integer version) {
		this.version=version;
		return this;
	}
	
	/**
	 * 获得 租户<br>
	 * 租户
	 * @return 租户
	*/
	public String getTenantId() {
		return tenantId;
	}
	
	/**
	 * 设置 租户
	 * @param tenantId 租户
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setTenantId(String tenantId) {
		this.tenantId=tenantId;
		return this;
	}
	
	/**
	 * 获得 originator<br>
	 * originator
	 * @return originator
	*/
	public Employee getOriginator() {
		return originator;
	}
	
	/**
	 * 设置 originator
	 * @param originator originator
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setOriginator(Employee originator) {
		this.originator=originator;
		return this;
	}
	
	/**
	 * 获得 companySubject<br>
	 * companySubject
	 * @return companySubject
	*/
	public FinCompanySubject getCompanySubject() {
		return companySubject;
	}
	
	/**
	 * 设置 companySubject
	 * @param companySubject companySubject
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setCompanySubject(FinCompanySubject companySubject) {
		this.companySubject=companySubject;
		return this;
	}
	
	/**
	 * 获得 project<br>
	 * project
	 * @return project
	*/
	public Project getProject() {
		return project;
	}
	
	/**
	 * 设置 project
	 * @param project project
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setProject(Project project) {
		this.project=project;
		return this;
	}
	
	/**
	 * 获得 contract<br>
	 * contract
	 * @return contract
	*/
	public Contract getContract() {
		return contract;
	}
	
	/**
	 * 设置 contract
	 * @param contract contract
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setContract(Contract contract) {
		this.contract=contract;
		return this;
	}
	
	/**
	 * 获得 历史流程清单<br>
	 * 历史流程清单
	 * @return 历史流程清单
	*/
	public List<ProcessInstance> getHistoricProcessList() {
		return historicProcessList;
	}
	
	/**
	 * 设置 历史流程清单
	 * @param historicProcessList 历史流程清单
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setHistoricProcessList(List<ProcessInstance> historicProcessList) {
		this.historicProcessList=historicProcessList;
		return this;
	}
	
	/**
	 * 添加 历史流程清单
	 * @param historicProcess 历史流程清单
	 * @return 当前对象
	*/
	public FinPaymentNoTicket addHistoricProcess(ProcessInstance... historicProcess) {
		if(this.historicProcessList==null) {
			historicProcessList=new ArrayList<>();
		}
		this.historicProcessList.addAll(Arrays.asList(historicProcess));
		return this;
	}
	
	/**
	 * 获得 在批的流程清单<br>
	 * 在批的流程清单
	 * @return 在批的流程清单
	*/
	public List<ProcessInstance> getCurrentProcessList() {
		return currentProcessList;
	}
	
	/**
	 * 设置 在批的流程清单
	 * @param currentProcessList 在批的流程清单
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setCurrentProcessList(List<ProcessInstance> currentProcessList) {
		this.currentProcessList=currentProcessList;
		return this;
	}
	
	/**
	 * 添加 在批的流程清单
	 * @param currentProcess 在批的流程清单
	 * @return 当前对象
	*/
	public FinPaymentNoTicket addCurrentProcess(ProcessInstance... currentProcess) {
		if(this.currentProcessList==null) {
			currentProcessList=new ArrayList<>();
		}
		this.currentProcessList.addAll(Arrays.asList(currentProcess));
		return this;
	}
	
	/**
	 * 获得 默认流程<br>
	 * 优先取在批的流程
	 * @return 默认流程
	*/
	public ProcessInstance getDefaultProcess() {
		return defaultProcess;
	}
	
	/**
	 * 设置 默认流程
	 * @param defaultProcess 默认流程
	 * @return 当前对象
	*/
	public FinPaymentNoTicket setDefaultProcess(ProcessInstance defaultProcess) {
		this.defaultProcess=defaultProcess;
		return this;
	}

	/**
	 * 将自己转换成指定类型的PO
	 * @param poType  PO类型
	 * @return FinPaymentNoTicket , 转换好的 FinPaymentNoTicket 对象
	*/
	@Transient
	public <T extends Entity> T toPO(Class<T> poType) {
		return EntityContext.create(poType, this);
	}

	/**
	 * 将自己转换成任意指定类型
	 * @param pojoType  Pojo类型
	 * @return FinPaymentNoTicket , 转换好的 PoJo 对象
	*/
	@Transient
	public <T> T toPojo(Class<T> pojoType) {
		if(Entity.class.isAssignableFrom(pojoType)) {
			return (T)this.toPO((Class<Entity>)pojoType);
		}
		try {
			T pojo=pojoType.newInstance();
			EntityContext.copyProperties(pojo, this);
			return pojo;
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}

	/**
	 * 克隆当前对象
	*/
	@Transient
	public FinPaymentNoTicket clone() {
		return duplicate(true);
	}

	/**
	 * 复制当前对象
	 * @param all 是否复制全部属性，当 false 时，仅复制来自数据表的属性
	*/
	@Transient
	public FinPaymentNoTicket duplicate(boolean all) {
		com.dt.platform.domain.oa.meta.FinPaymentNoTicketMeta.$$proxy$$ inst = new com.dt.platform.domain.oa.meta.FinPaymentNoTicketMeta.$$proxy$$();
		inst.setAmount(this.getAmount());
		inst.setNotes(this.getNotes());
		inst.setUpdateTime(this.getUpdateTime());
		inst.setPaymentAmount(this.getPaymentAmount());
		inst.setVersion(this.getVersion());
		inst.setPaymentLastDate(this.getPaymentLastDate());
		inst.setBusinessCode(this.getBusinessCode());
		inst.setCreateBy(this.getCreateBy());
		inst.setDeleted(this.getDeleted());
		inst.setFileIds(this.getFileIds());
		inst.setCreateTime(this.getCreateTime());
		inst.setUpdateBy(this.getUpdateBy());
		inst.setDeleteTime(this.getDeleteTime());
		inst.setPaymentSubject(this.getPaymentSubject());
		inst.setName(this.getName());
		inst.setContractId(this.getContractId());
		inst.setTenantId(this.getTenantId());
		inst.setDeleteBy(this.getDeleteBy());
		inst.setId(this.getId());
		inst.setOriginatorId(this.getOriginatorId());
		inst.setProjectId(this.getProjectId());
		inst.setPaymentStatus(this.getPaymentStatus());
		inst.setStatus(this.getStatus());
		inst.setCollectSubject(this.getCollectSubject());
		if(all) {
			inst.setContract(this.getContract());
			inst.setProject(this.getProject());
			inst.setHistoricProcessList(this.getHistoricProcessList());
			inst.setOriginator(this.getOriginator());
			inst.setCompanySubject(this.getCompanySubject());
			inst.setCurrentProcessList(this.getCurrentProcessList());
			inst.setDefaultProcess(this.getDefaultProcess());
		}
		inst.clearModifies();
		return inst;
	}

	/**
	 * 克隆当前对象
	*/
	@Transient
	public FinPaymentNoTicket clone(boolean deep) {
		return EntityContext.clone(FinPaymentNoTicket.class,this,deep);
	}

	/**
	 * 将 Map 转换成 FinPaymentNoTicket
	 * @param finPaymentNoTicketMap 包含实体信息的 Map 对象
	 * @return FinPaymentNoTicket , 转换好的的 FinPaymentNoTicket 对象
	*/
	@Transient
	public static FinPaymentNoTicket createFrom(Map<String,Object> finPaymentNoTicketMap) {
		if(finPaymentNoTicketMap==null) return null;
		FinPaymentNoTicket po = create();
		EntityContext.copyProperties(po,finPaymentNoTicketMap);
		po.clearModifies();
		return po;
	}

	/**
	 * 将 Pojo 转换成 FinPaymentNoTicket
	 * @param pojo 包含实体信息的 Pojo 对象
	 * @return FinPaymentNoTicket , 转换好的的 FinPaymentNoTicket 对象
	*/
	@Transient
	public static FinPaymentNoTicket createFrom(Object pojo) {
		if(pojo==null) return null;
		FinPaymentNoTicket po = create();
		EntityContext.copyProperties(po,pojo);
		po.clearModifies();
		return po;
	}

	/**
	 * 创建一个 FinPaymentNoTicket，等同于 new
	 * @return FinPaymentNoTicket 对象
	*/
	@Transient
	public static FinPaymentNoTicket create() {
		return new com.dt.platform.domain.oa.meta.FinPaymentNoTicketMeta.$$proxy$$();
	}

	/**
	 * 从 Map 读取
	 * @param map 记录数据
	 * @param cast 是否用 DataParser 进行类型转换
	 * @return  是否读取成功
	*/
	public boolean read(Map<String, Object> map,boolean cast) {
		if(map==null) return false;
		if(cast) {
			this.setAmount(DataParser.parse(BigDecimal.class, map.get(FinPaymentNoTicketMeta.AMOUNT)));
			this.setNotes(DataParser.parse(String.class, map.get(FinPaymentNoTicketMeta.NOTES)));
			this.setUpdateTime(DataParser.parse(Date.class, map.get(FinPaymentNoTicketMeta.UPDATE_TIME)));
			this.setPaymentAmount(DataParser.parse(BigDecimal.class, map.get(FinPaymentNoTicketMeta.PAYMENT_AMOUNT)));
			this.setVersion(DataParser.parse(Integer.class, map.get(FinPaymentNoTicketMeta.VERSION)));
			this.setPaymentLastDate(DataParser.parse(Date.class, map.get(FinPaymentNoTicketMeta.PAYMENT_LAST_DATE)));
			this.setBusinessCode(DataParser.parse(String.class, map.get(FinPaymentNoTicketMeta.BUSINESS_CODE)));
			this.setCreateBy(DataParser.parse(String.class, map.get(FinPaymentNoTicketMeta.CREATE_BY)));
			this.setDeleted(DataParser.parse(Integer.class, map.get(FinPaymentNoTicketMeta.DELETED)));
			this.setFileIds(DataParser.parse(String.class, map.get(FinPaymentNoTicketMeta.FILE_IDS)));
			this.setCreateTime(DataParser.parse(Date.class, map.get(FinPaymentNoTicketMeta.CREATE_TIME)));
			this.setUpdateBy(DataParser.parse(String.class, map.get(FinPaymentNoTicketMeta.UPDATE_BY)));
			this.setDeleteTime(DataParser.parse(Date.class, map.get(FinPaymentNoTicketMeta.DELETE_TIME)));
			this.setPaymentSubject(DataParser.parse(String.class, map.get(FinPaymentNoTicketMeta.PAYMENT_SUBJECT)));
			this.setName(DataParser.parse(String.class, map.get(FinPaymentNoTicketMeta.NAME)));
			this.setContractId(DataParser.parse(String.class, map.get(FinPaymentNoTicketMeta.CONTRACT_ID)));
			this.setTenantId(DataParser.parse(String.class, map.get(FinPaymentNoTicketMeta.TENANT_ID)));
			this.setDeleteBy(DataParser.parse(String.class, map.get(FinPaymentNoTicketMeta.DELETE_BY)));
			this.setId(DataParser.parse(String.class, map.get(FinPaymentNoTicketMeta.ID)));
			this.setOriginatorId(DataParser.parse(String.class, map.get(FinPaymentNoTicketMeta.ORIGINATOR_ID)));
			this.setProjectId(DataParser.parse(String.class, map.get(FinPaymentNoTicketMeta.PROJECT_ID)));
			this.setPaymentStatus(DataParser.parse(String.class, map.get(FinPaymentNoTicketMeta.PAYMENT_STATUS)));
			this.setStatus(DataParser.parse(String.class, map.get(FinPaymentNoTicketMeta.STATUS)));
			this.setCollectSubject(DataParser.parse(String.class, map.get(FinPaymentNoTicketMeta.COLLECT_SUBJECT)));
			// others
			this.setContract(DataParser.parse(Contract.class, map.get(FinPaymentNoTicketMeta.CONTRACT)));
			this.setProject(DataParser.parse(Project.class, map.get(FinPaymentNoTicketMeta.PROJECT)));
			this.setOriginator(DataParser.parse(Employee.class, map.get(FinPaymentNoTicketMeta.ORIGINATOR)));
			this.setCompanySubject(DataParser.parse(FinCompanySubject.class, map.get(FinPaymentNoTicketMeta.COMPANY_SUBJECT)));
			this.setDefaultProcess(DataParser.parse(ProcessInstance.class, map.get(FinPaymentNoTicketMeta.DEFAULT_PROCESS)));
			return true;
		} else {
			try {
				this.setAmount( (BigDecimal)map.get(FinPaymentNoTicketMeta.AMOUNT));
				this.setNotes( (String)map.get(FinPaymentNoTicketMeta.NOTES));
				this.setUpdateTime( (Date)map.get(FinPaymentNoTicketMeta.UPDATE_TIME));
				this.setPaymentAmount( (BigDecimal)map.get(FinPaymentNoTicketMeta.PAYMENT_AMOUNT));
				this.setVersion( (Integer)map.get(FinPaymentNoTicketMeta.VERSION));
				this.setPaymentLastDate( (Date)map.get(FinPaymentNoTicketMeta.PAYMENT_LAST_DATE));
				this.setBusinessCode( (String)map.get(FinPaymentNoTicketMeta.BUSINESS_CODE));
				this.setCreateBy( (String)map.get(FinPaymentNoTicketMeta.CREATE_BY));
				this.setDeleted( (Integer)map.get(FinPaymentNoTicketMeta.DELETED));
				this.setFileIds( (String)map.get(FinPaymentNoTicketMeta.FILE_IDS));
				this.setCreateTime( (Date)map.get(FinPaymentNoTicketMeta.CREATE_TIME));
				this.setUpdateBy( (String)map.get(FinPaymentNoTicketMeta.UPDATE_BY));
				this.setDeleteTime( (Date)map.get(FinPaymentNoTicketMeta.DELETE_TIME));
				this.setPaymentSubject( (String)map.get(FinPaymentNoTicketMeta.PAYMENT_SUBJECT));
				this.setName( (String)map.get(FinPaymentNoTicketMeta.NAME));
				this.setContractId( (String)map.get(FinPaymentNoTicketMeta.CONTRACT_ID));
				this.setTenantId( (String)map.get(FinPaymentNoTicketMeta.TENANT_ID));
				this.setDeleteBy( (String)map.get(FinPaymentNoTicketMeta.DELETE_BY));
				this.setId( (String)map.get(FinPaymentNoTicketMeta.ID));
				this.setOriginatorId( (String)map.get(FinPaymentNoTicketMeta.ORIGINATOR_ID));
				this.setProjectId( (String)map.get(FinPaymentNoTicketMeta.PROJECT_ID));
				this.setPaymentStatus( (String)map.get(FinPaymentNoTicketMeta.PAYMENT_STATUS));
				this.setStatus( (String)map.get(FinPaymentNoTicketMeta.STATUS));
				this.setCollectSubject( (String)map.get(FinPaymentNoTicketMeta.COLLECT_SUBJECT));
				// others
				this.setContract( (Contract)map.get(FinPaymentNoTicketMeta.CONTRACT));
				this.setProject( (Project)map.get(FinPaymentNoTicketMeta.PROJECT));
				this.setOriginator( (Employee)map.get(FinPaymentNoTicketMeta.ORIGINATOR));
				this.setCompanySubject( (FinCompanySubject)map.get(FinPaymentNoTicketMeta.COMPANY_SUBJECT));
				this.setDefaultProcess( (ProcessInstance)map.get(FinPaymentNoTicketMeta.DEFAULT_PROCESS));
				return true;
			} catch (Exception e) {
				return false;
			}
		}
	}

	/**
	 * 从 Map 读取
	 * @param r 记录数据
	 * @param cast 是否用 DataParser 进行类型转换
	 * @return  是否读取成功
	*/
	public boolean read(ExprRcd r,boolean cast) {
		if(r==null) return false;
		if(cast) {
			this.setAmount(DataParser.parse(BigDecimal.class, r.getValue(FinPaymentNoTicketMeta.AMOUNT)));
			this.setNotes(DataParser.parse(String.class, r.getValue(FinPaymentNoTicketMeta.NOTES)));
			this.setUpdateTime(DataParser.parse(Date.class, r.getValue(FinPaymentNoTicketMeta.UPDATE_TIME)));
			this.setPaymentAmount(DataParser.parse(BigDecimal.class, r.getValue(FinPaymentNoTicketMeta.PAYMENT_AMOUNT)));
			this.setVersion(DataParser.parse(Integer.class, r.getValue(FinPaymentNoTicketMeta.VERSION)));
			this.setPaymentLastDate(DataParser.parse(Date.class, r.getValue(FinPaymentNoTicketMeta.PAYMENT_LAST_DATE)));
			this.setBusinessCode(DataParser.parse(String.class, r.getValue(FinPaymentNoTicketMeta.BUSINESS_CODE)));
			this.setCreateBy(DataParser.parse(String.class, r.getValue(FinPaymentNoTicketMeta.CREATE_BY)));
			this.setDeleted(DataParser.parse(Integer.class, r.getValue(FinPaymentNoTicketMeta.DELETED)));
			this.setFileIds(DataParser.parse(String.class, r.getValue(FinPaymentNoTicketMeta.FILE_IDS)));
			this.setCreateTime(DataParser.parse(Date.class, r.getValue(FinPaymentNoTicketMeta.CREATE_TIME)));
			this.setUpdateBy(DataParser.parse(String.class, r.getValue(FinPaymentNoTicketMeta.UPDATE_BY)));
			this.setDeleteTime(DataParser.parse(Date.class, r.getValue(FinPaymentNoTicketMeta.DELETE_TIME)));
			this.setPaymentSubject(DataParser.parse(String.class, r.getValue(FinPaymentNoTicketMeta.PAYMENT_SUBJECT)));
			this.setName(DataParser.parse(String.class, r.getValue(FinPaymentNoTicketMeta.NAME)));
			this.setContractId(DataParser.parse(String.class, r.getValue(FinPaymentNoTicketMeta.CONTRACT_ID)));
			this.setTenantId(DataParser.parse(String.class, r.getValue(FinPaymentNoTicketMeta.TENANT_ID)));
			this.setDeleteBy(DataParser.parse(String.class, r.getValue(FinPaymentNoTicketMeta.DELETE_BY)));
			this.setId(DataParser.parse(String.class, r.getValue(FinPaymentNoTicketMeta.ID)));
			this.setOriginatorId(DataParser.parse(String.class, r.getValue(FinPaymentNoTicketMeta.ORIGINATOR_ID)));
			this.setProjectId(DataParser.parse(String.class, r.getValue(FinPaymentNoTicketMeta.PROJECT_ID)));
			this.setPaymentStatus(DataParser.parse(String.class, r.getValue(FinPaymentNoTicketMeta.PAYMENT_STATUS)));
			this.setStatus(DataParser.parse(String.class, r.getValue(FinPaymentNoTicketMeta.STATUS)));
			this.setCollectSubject(DataParser.parse(String.class, r.getValue(FinPaymentNoTicketMeta.COLLECT_SUBJECT)));
			return true;
		} else {
			try {
				this.setAmount( (BigDecimal)r.getValue(FinPaymentNoTicketMeta.AMOUNT));
				this.setNotes( (String)r.getValue(FinPaymentNoTicketMeta.NOTES));
				this.setUpdateTime( (Date)r.getValue(FinPaymentNoTicketMeta.UPDATE_TIME));
				this.setPaymentAmount( (BigDecimal)r.getValue(FinPaymentNoTicketMeta.PAYMENT_AMOUNT));
				this.setVersion( (Integer)r.getValue(FinPaymentNoTicketMeta.VERSION));
				this.setPaymentLastDate( (Date)r.getValue(FinPaymentNoTicketMeta.PAYMENT_LAST_DATE));
				this.setBusinessCode( (String)r.getValue(FinPaymentNoTicketMeta.BUSINESS_CODE));
				this.setCreateBy( (String)r.getValue(FinPaymentNoTicketMeta.CREATE_BY));
				this.setDeleted( (Integer)r.getValue(FinPaymentNoTicketMeta.DELETED));
				this.setFileIds( (String)r.getValue(FinPaymentNoTicketMeta.FILE_IDS));
				this.setCreateTime( (Date)r.getValue(FinPaymentNoTicketMeta.CREATE_TIME));
				this.setUpdateBy( (String)r.getValue(FinPaymentNoTicketMeta.UPDATE_BY));
				this.setDeleteTime( (Date)r.getValue(FinPaymentNoTicketMeta.DELETE_TIME));
				this.setPaymentSubject( (String)r.getValue(FinPaymentNoTicketMeta.PAYMENT_SUBJECT));
				this.setName( (String)r.getValue(FinPaymentNoTicketMeta.NAME));
				this.setContractId( (String)r.getValue(FinPaymentNoTicketMeta.CONTRACT_ID));
				this.setTenantId( (String)r.getValue(FinPaymentNoTicketMeta.TENANT_ID));
				this.setDeleteBy( (String)r.getValue(FinPaymentNoTicketMeta.DELETE_BY));
				this.setId( (String)r.getValue(FinPaymentNoTicketMeta.ID));
				this.setOriginatorId( (String)r.getValue(FinPaymentNoTicketMeta.ORIGINATOR_ID));
				this.setProjectId( (String)r.getValue(FinPaymentNoTicketMeta.PROJECT_ID));
				this.setPaymentStatus( (String)r.getValue(FinPaymentNoTicketMeta.PAYMENT_STATUS));
				this.setStatus( (String)r.getValue(FinPaymentNoTicketMeta.STATUS));
				this.setCollectSubject( (String)r.getValue(FinPaymentNoTicketMeta.COLLECT_SUBJECT));
				return true;
			} catch (Exception e) {
				return false;
			}
		}
	}
}